.vp-highlight-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  &:nth-child(odd) {
    .vp-highlight {
      flex-flow: row-reverse;
    }
  }
}

.vp-highlight {
  z-index: 1;

  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;

  max-width: var(--home-page-width);
  margin: 0 auto;
  padding: 1.5rem 2.5rem;

  @media (max-width: hope-config.$tablet) {
    display: block;
    padding-inline: 1.5rem;
    text-align: center;
  }
}

.vp-highlight-bg {
  position: absolute;
  inset: 0;
  z-index: 0;

  background-attachment: fixed;
  background-position: 50%;
  background-size: cover;

  &.light {
    display: inline-block;
  }

  &.dark {
    display: none;
  }

  [data-theme="dark"] & {
    &.light {
      display: none;
    }

    &.dark {
      display: inline-block;
    }
  }
}

.vp-highlight-image {
  width: 12rem;
  margin: 2rem 4rem;

  @media (max-width: hope-config.$pad) {
    width: 10rem;
  }

  @media (max-width: hope-config.$tablet) {
    width: 8rem;
    margin: 0 auto;
  }

  &.light {
    display: inline-block;
  }

  &.dark {
    display: none;
  }

  [data-theme="dark"] & {
    &.light {
      display: none;
    }

    &.dark {
      display: inline-block;
    }
  }
}

.vp-highlight-info-wrapper {
  display: flex;
  flex: 1;
  justify-content: center;
  padding: 2rem;

  @media (max-width: hope-config.$tablet) {
    padding: 1rem 0;
  }

  &:only-child {
    flex: 1 0 100%;
  }
}

.vp-highlight-info {
  text-align: start;
}

.vp-highlight-header {
  margin-bottom: 1.5rem;
  border-bottom: none;
  font-size: 3rem;
  font-family: var(--vp-font);

  @media (max-width: hope-config.$pad) {
    font-size: 2.5rem;
  }

  @media (max-width: hope-config.$tablet) {
    font-size: 2.25rem;
    text-align: center;
  }

  @media (max-width: hope-config.$mobile) {
    font-size: 2rem;
  }
}

.vp-highlight-description {
  margin: 1rem 0;
  font-size: 1.125rem;
}

.vp-highlights {
  margin-inline-start: -1.25em;
  padding-inline-start: 0;

  // prevent inline code text unreadable
  :not(pre) > code {
    color: var(--vp-c-text);
  }
}

.vp-highlight-item-wrapper {
  position: relative;

  padding-block: 0.5em;
  padding-inline: 0.5em 1.75em;
  border-radius: 0.5rem;

  list-style: none;

  &.link {
    cursor: pointer;
    transition: transform var(--vp-t-transform);

    &:hover {
      background-color: var(--vp-c-bg-alt);

      .vp-highlight-bg + .vp-highlight & {
        background-color: transparent;
        backdrop-filter: blur(12px);
      }

      &::before {
        content: "➜";
        display: block;
        float: right;
      }
    }

    &:active {
      transform: scale(0.96);
    }
  }

  &::marker {
    font-weight: bold;
  }
}

.vp-highlight-item {
  display: list-item;
  color: inherit;
  list-style: initial;

  @media print {
    text-decoration: none;
  }
}

.vp-highlight-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.125rem;
  font-family: var(--vp-font);

  .vp-icon {
    margin-inline-end: 0.25em;
  }
}

.vp-highlight-details {
  margin: 0.5rem 0 0;
}
